
import { dictApi } from "@/api";
import { mobxState } from "@/data";

/**
 * @description 重载字典数据
 */
const reloadDictJson = () => {
    if (sessionStorage.token) {
        dictApi.getDictConfig().then(({ data }) => {
            mobxState.updateDictDataJson(data);
        }).catch(error => {
            console.log("字典加载错误", error)
        })

    }
}
export default reloadDictJson